%table{ class: 'records' }
  %thead
    %tr
      %th Name
      %th Last updated on
      %th
  %tbody
    - @discerner_searches.each do |search|
      %tr{:class=>"#{cycle('odd_record','even_record')} #{'error' if search.disabled?}"}
        %td
          = search.display_name
        %td
          = discerner_format_datetime(search.last_executed)
        %td
          = link_to 'Open', edit_search_path(search), class: 'discerner-show-link discerner-icon-link'
          = link_to 'Export options', export_parameters_path(search), class: 'discerner-options-link discerner-icon-link' if export_discerner_results?
          = link_to 'Delete', search_path(search), data: {confirm: 'Are you sure?'}, method: :delete, class: "discerner-icon-link discerner-delete-link"